package org.linlinjava.litemall.core.util;

/**
 * @Author: Daisen.Z
 * @Date: 2021/6/3 15:54
 * @Version: 1.0
 * @Description: 全局的枚举类
 */
public interface YwcgEnumUtil {

    // 各个模块名称和数字代号枚举
    enum ModelNameCode{
        /*
        0科研业务项目、1期刊论文、2论著、3科技奖励、4专利、
        5软件著作权、6标准、7制度/规划/报告/方案等、8地震仪器样机/软件、
        9科普作品、10短临预报、11其他成果、12野外探测部分、13野外工作成果
         */
        /**
         * 各个结尾说明:
         * P：Project，项目
         * R：Result：成果
         * W：worlk：工作
         */
        KYP(0, "科研业务项目"),
        LWR(1, "期刊论文"),
        LZR(2, "论著"),
        KKJLR(3, "科技奖励"),
        ZLR(4, "专利"),
        RJZZR(5, "软件著作权"),
        BZR(6, "标准"),
        ZDR(7, "制度/规划/报告/方案等"),
        DZYR(8, "地震仪器样机/软件"),
        KPR(9, "科普作品"),
        DLR(10, "短临预报"),
        QTR(11, "其他成果"),
        YWTCW(12, "野外探测部分"),
        YWTCR(13, "野外工作成果"),
        ;
        private int code;
        private String name;

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        ModelNameCode(int code, String name) {
            this.code = code;
            this.name = name;
        }

        public static String getName(int code) {
            for (ModelNameCode a : ModelNameCode.values()) {
                if (code == a.getCode()) {
                    return a.getName();
                }
            }
            return "";
        }
    }


    // 成员职责枚举
    enum PersonDutyNameCode{
        FIRST(1, "第一完成人(负责人)"),
        SECOND(2, "主要参与人"),
        THRID(3, "其他参与人"),
        ;

        private int code;
        private String name;

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        PersonDutyNameCode(int code, String name) {
            this.code = code;
            this.name = name;
        }

        public static String getName(int code) {
            for (PersonDutyNameCode a : PersonDutyNameCode.values()) {
                if (code == a.getCode()) {
                    return a.getName();
                }
            }
            return "";
        }
    }

    // 管理员账号设置
    enum AdminRoleNameCode{
        FIRST(1, "超级管理员"),
        ;

        private int code;
        private String name;

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        AdminRoleNameCode(int code, String name) {
            this.code = code;
            this.name = name;
        }

        public static String getName(int code) {
            for (AdminRoleNameCode a : AdminRoleNameCode.values()) {
                if (code == a.getCode()) {
                    return a.getName();
                }
            }
            return "";
        }
    }

    // 审核状态
    interface StatusAuditCode{
        // 审核状态，未提交1、审核中2、已审核3、已退回4
        int noSubmit = 1;
        int waitPass = 2;
        int pass = 3;
        int backUp = 4;
    }

}
